package controllers;

import java.io.File;

import play.Play;
import play.PlayPlugin;
import play.mvc.Scope;

public class MyPlugin extends PlayPlugin {

	@Override
	public void onLoad() {
		super.onLoad();
	}

	@Override
	public void onApplicationReady() {
		Scope.Params pm = Scope.Params.current();
		//判断是否为本机
		String packPath = Play.configuration.getProperty("pack.path");
		
		File file = new File(packPath);
		if(file.exists()){
			System.out.println("jenkins和项目在一个目录中");
		}else{
			System.out.println("jenkins和项目不在一个目录中");
		}
		System.out.println("测试");
		super.onApplicationReady();
	}

	@Override
	public void beforeInvocation() {
//		Scope.RenderArgs args = Scope.RenderArgs.current();
//		args.put("yutao", "my name is yutao");
		super.beforeInvocation();
	}
}
